<!--会员中心-->
<template>
  <div style="width: 1200px;margin: 0 auto;padding: 10px 0px;
box-sizing: border-box;height: 700px;background-color: white;border-radius: 4px">
    <el-row :gutter="10">
      <el-col :span="4" >
        <div style="width: 230px;overflow: hidden;text-align: center">
          <el-button class="el-icon-edit-outline"
                     style="width: 100px;height: 50px" @click="locationReleaseRecuitInfo"  type="primary">发布招工</el-button>
          <el-button class="el-icon-postcard"
                     style="width: 100px;height: 50px" @click="locationReleasePersonInfo"  type="primary">找活名片</el-button>
          <br>
          <el-menu
              router
              default-active="2"
              class="el-menu-vertical-demo"
              style="text-align: left;margin: 0 auto"
              @open="handleOpen"
              @close="handleClose">
            <el-menu-item @click="locationManageRecuit" index="1">
              <i class="el-icon-tickets"></i>
              <span slot="title">管理招工</span>
            </el-menu-item>
            <el-menu-item @click="locationPersonInfo" index="2">
              <i class="el-icon-user"></i>
              <span slot="title">个人信息</span>
            </el-menu-item>
            <el-menu-item @click="locationReleaseRecuitInfo"  index="3" >
              <i class="el-icon-upload2"></i>
              <span slot="title">发布招工信息</span>
            </el-menu-item>
            <el-menu-item @click="locationReleaseTrade" index="4">
              <i class="el-icon-shopping-cart-full"></i>
              <span slot="title">发布二手交易</span>
            </el-menu-item>
            <el-menu-item @click="locationManageTrade" index="5">
              <i class="el-icon-document"></i>
              <span slot="title">管理二手交易</span>
            </el-menu-item>
            <el-menu-item @click="locationAuthentica" index="6">
              <i class="el-icon-user-solid"></i>
              <span slot="title">认证管理</span>
            </el-menu-item>
            <el-menu-item @click="locationEnterprise" index="7">
              <i class="el-icon-s-check"></i>
              <span slot="title">企业管理</span>
            </el-menu-item>
            <el-menu-item @click="locationMyView" index="8">
              <i class="el-icon-view"></i>
              <span slot="title">我的查看</span>
            </el-menu-item>
            <el-menu-item @click="locationEarnPoints" index="9">
              <i class="el-icon-coin"></i>
              <span slot="title">获取积分</span>
            </el-menu-item>
            <el-menu-item @click="locationConsumRecord" index="10">
              <i class="el-icon-bank-card"></i>
              <span slot="title">消费记录</span>
            </el-menu-item>
          </el-menu>
        </div>
      </el-col>
      <el-col :span="18">
        <router-view/>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "MemberView",
  user:{},
  data(){
    return{

    }
  },
  methods: {
    handleOpen(){

    },
    handleClose(){

    },


    //路由跳转

    locationReleaseTrade() {
      this.$router.push("/member/releasetrade")
    },

    locationReleaseRecuitInfo() {
      this.$router.push("/member/releaserecuit")
    },

    locationReleasePersonInfo() {
      this.$router.push("/member/releaseperson")
    },

    locationPersonInfo() {
      this.$router.push("/member/personinfo")
    },

    locationMyView() {
      this.$router.push("/member/myview")
    },

    locationManageTrade() {
      this.$router.push("/member/managetrade")
    },

    locationManageRecuit() {
      this.$router.push("/member/managerecit")
    },

    locationEnterprise(){
      this.$router.push("/member/entermanage")
    },

    locationEarnPoints(){
      this.$router.push("/member/earnpoints")
    },

    locationConsumRecord(){
      this.$router.push("/member/consum")
    },

    locationAuthentica(){
      this.$router.push("/member/authentica")
    }
  },
  created() {

  },
  mounted() {
    let jsonUser=localStorage.user?localStorage.user:null;
    this.user=JSON.parse(jsonUser);//
    if (this.user==null){
      this.$message.error("您还未登录！")
      this.$router.push('/login');
    }
  }
}
</script>

<style scoped>

</style>